Fix is_image attachment attribute to properly reflect whether the attachment is an image #17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the
content_type
field to message attachments stored within MongoDB modmail logs and refactors theis_image
field to be based off content type instead of width. The previous behavior lead to problems with content such as video which also have a width.content_type
is a direct copy of the information as reported by discord. This will also fix an issue (for newly sent attachments only) in logviewer where videos are broken because it tries to load them as images.I'm not totally sure why the code was done like this in the first place, because discord.py clearly states that it applies to videos, so maybe there's some actual reason behind this that I'm just unaware of?